package com.springcloud.configuration;

import com.springcloud.rules.MyRule;
import org.springframework.cloud.netflix.ribbon.RibbonClient;
import org.springframework.context.annotation.Configuration;

/**
 * 负载均衡策略
 * @author: 顾志杰
 */
@Configuration
@RibbonClient(name = "eureka-client",configuration = MyRule.class)
public class RibbonConfiguration {

    /**
     * RandomRule 随机负载均衡
     * @return
     */
//    @Bean
//    public IRule defaultLBStrategy(){
//        return new RandomRule();
//    }
}
